package com.czk.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.czk.pojo.User;
import com.czk.service.UserService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/3/23 11:54
 */
@Component
@Service(interfaceClass = UserService.class, version = "1.0") // 暴露dubbo服务
public class UserServiceImpl implements UserService {
    @Value("${server.port}")
    private Integer port;

    @Override
    public User getUserByName(String username) {
        User user = new User(username+" "+port, 16, "男");
        return user;
    }
}
